package cn.ahxb.frame.work.ui.user.activities;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import androidx.annotation.Nullable;

import butterknife.OnClick;
import cn.ahxb.frame.R;
import cn.ahxb.frame.common.base.BaseMvpActivity;
import cn.ahxb.frame.work.ui.home.activities.MainActivity;
import cn.ahxb.frame.work.ui.user.presenter.LoginPresenter;
import cn.ahxb.frame.work.ui.user.view.LoginView;

public class LoginActivity extends BaseMvpActivity<LoginView,LoginPresenter> implements LoginView {

    @Override
    protected int setContentLayoutRes() {
        return R.layout.activity_login;
    }

    @Override
    protected void initView() {
        requestTranslucentStatusBar(Color.TRANSPARENT,false);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected LoginPresenter createPresenter() {
        return new LoginPresenter();
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mPresenter.doLogin();
    }

    @OnClick(R.id.btn_login)
    void login(){
        startActivity(new Intent(this, MainActivity.class));
    }

    @Override
    public void showLoadingView() {

    }

    @Override
    public void hideLoadingView() {

    }

    @Override
    public void onNetworkError() {

    }
}
